###########################################  
#Makefile for pc02321  
###########################################  
TOOL_CHAINS_PATH = /home/paul/bin/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2
INC += -I$(TOOL_CHAINS_PATH)/usr/include  -I./include  
LIB = -lm -levent -lubus -lubox -lpthread -luci -ljson-c -lreader -lsqlite3  
USR_LIB_PATH = -L./lib  
CC = /home/paul/bin/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-gcc  
CC_FLAG = -Wall  
PRG = pc02321  
OBJ = main.o util.o cmd_mgr.o ubus_mgr.o db_option.o debug.o record_option.o  
  
$(PRG):$(OBJ)  
	$(CC) $(USR_LIB_PATH) $(INC) $(LIB) -o $@ $(OBJ)  
      
.SUFFIXES: .c .o .cpp
.c.o:  
	$(CC) $(CC_FLAG) $(USR_LIB_PATH) $(INC) -c $*.c -o $*.o  
  
.PRONY:clean  
clean:  
	@echo "Removing linked and compiled files......"  
	rm -f $(OBJ) $(PRG) 